1. Technical Field
The present invention relates generally to networked computer programming, and specifically to the improvement of execution performance of network applications communicating with each other in a single operating system.
2. Description of the Related Art
Modern telecommunications depends on networks. A network is a set of interconnected machines (network elements) that allow data to be relayed across the set of machines from a source to a destination. Networks may be classified according to the geographic area they occupy. A local area network (LAN) is usually defined as a network that is physically limited to a relatively small area, such as a building or group of buildings. A wide area network (WAN) is a general term for a network of larger size.
Networking protocols, which define the rules for communication between network elements, are typically designed to work in layers, where each layer performs a slightly different role in data transmission. TCP/IP (Transmission Control Protocol/Internet Protocol) is a collection of protocols (called a protocol suite) that forms the basis for the Internet and many other networks. TCP/IP is generally considered to follow a four-layer protocol model.
An application programmer needing to write networking-enabled software typically uses an application programming interface (API) that allows the programmer to program network communications in an abstract way without explicitly addressing the specifics of each protocol layer. Perhaps the most widely utilized of such APIs is the “sockets” API commonly provided in UNIX/POSIX-based operating systems; similar “sockets” and “sockets”-like APIs are provided in other operating systems and programming environments, such as the JAVA programming environment, for example. The “sockets” approach to network communication is to model a connection between two network entities as a stream or abstract file, which is called a “socket”. In the usual POSIX “sockets” library for use in programming in the C programming language, opening a socket generates a “socket descriptor” number, which is analogous to a file descriptor. Subsequent input/output (I/O) from/to the socket is performed by passing the “socket descriptor” to I/O routines, just as in the case of a file descriptor.
Although it is arguable that the ultimate aim of network programming is to allow various computers in a network to communicate with one another, it often occurs that two communicating network applications will actually reside on the same computer and same operating system instance. For example, an application server process may communicate with a database server process on the same operating system instance. In such cases, a modern operating system will generally avoid using the computer's networking hardware to enable the communication, but will still process the communication through the usual protocol layers (e.g., the layers of the TCP/IP protocol suite). The usefulness of the processing performed by these layers, however, is of less value for communication between software entities on the same system. For instance, encryption of data being transmitted between two processes on the same system is superfluous.
In existing technology, however, there is no way to bypass this additional network processing without including additional (non-standard) code in each application to enable this type of bypass when applicable. Moreover, this type of bypass cannot be used in a partitioned system, i.e., a system that is divided into two or more software partitions. Software partitions are virtual operating system instances residing on the same physical system and sharing the same operating system (kernel) code. A software partition cannot see certain aspects the global environment and other software partitions (including network-related information), except as they would be visible from a physically separate system. Thus, in the event that communicating applications resided in separate software partitions on one global system, the applications would not be capable of determining that they existed on the same system and would therefore not be able to bypass the full network protocol processing using the technique described above.
What is needed, therefore, is a method of bypassing full protocol stack processing for communications between two processes residing on the same system, even in the event that the two processes reside in different software partitions or under other circumstances that prevent the applications themselves from determining whether they reside on the same system. The present invention provides a solution to this and other problems, and offers other advantages over previous solutions.